package com.spzx.manager.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Project: spzx-parent
 * Package: com.spzx.manager.mapper
 * Version: 1.0
 * <p>
 * Created by  wangjiaxin  on 2024/2/26 22:11
 */
@Mapper
public interface SysRoleUserMapper {

    //删除用户分配数据
    public abstract void deleteByUserId(Long userId);                // 根据用户的id删除数据

    //用户分配角色
    public abstract void doAssign(@Param("userId") Long userId,
                                  @Param("roleId") Long roleId);        // 添加关联关系

    //查询当前登录用户的角色数据
    public abstract List<Long> findSysUserRoleByUserId(Long userId);
}
